// pages/ce/hah.js
var app = getApp()

Page({

  /**
   * 页面的初始数据
   */
  data: {
    tabBar: '',
    color:'red',
    id:'200'
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (id) {
    // console.log(options.id)
    //  console.log(app)
    app.editTabBar()
    this.setData({
      tabBar: app,
      id:id.id
    })
  },
  bindDateChange1: function (e) {
    console.log(e.detail.value)
   
  },
  bindDateChange2: function (e) {
    console.log(e)
  },
  // 销售流水
  autoindex:function(){
    wx.navigateTo({
      url: "/pages/autoindex/autoindex",
    })
  },
  // 顾客进店
  TurnoverStatistics:function () {
    wx.navigateTo({
      url: "/pages/TurnoverStatistics/TurnoverStatistics",
    })
  },
  // 营业额统计
  Customers:function () {
    wx.navigateTo({
      url: "/pages/Customers/Customers",
    })
  },
  Monthly:function(){
    wx.navigateTo({
      url: "/pages/Monthly/Monthly",
    })
  },
  Sequentialdata:function(){
    wx.navigateTo({
      url: "/pages/Sequentialdata/Sequentialdata",
    })
  },
  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady: function () {

  },
  dayClick: function (event) {
    let clickDay = event.detail.day;
    let changeDay = `dayStyle[1].day`;
    let changeBg = `dayStyle[1].background`;
    console.log(event)
    
    this.setData({
      [changeDay]: clickDay,
      [changeBg]: "#84e7d0"
    })
  },
  dayClick1: function (event) {
    let clickDay = event.detail.day;
    
  },
  /**
   * 生命周期函数--监听页面显示
   */
  onShow: function () {

  },

  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide: function () {

  },

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload: function () {

  },

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh: function () {

  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom: function () {

  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage: function () {

  }
})